console.log('1');
async function async1() {
  console.log('2');
  new Promise((resolve) => {
    async2();
    resolve()
  }).then(() => {
    console.log("3");
  })
};
async function async2() {
  console.log('123')
  setTimeout(() => {
    console.log('4');
  }, 1000)
};
setTimeout(function () {
  console.log('6');
  new Promise(function (resolve) {
    console.log('8');
    resolve();
  }).then(function () { console.log('9') })
});

async1();

new Promise(function (resolve) {
  console.log('10');
  resolve();
}).then(function () {
  console.log('11');
});
console.log('12');


